package com.shengjing.apk.util

import android.os.Environment
import java.io.File
import java.net.URL

object FileUtil {
    fun downloadImage(imageUrl: String): String {
        val output = File("${Environment.getExternalStorageDirectory().absolutePath}/temp")
        val requestUrl = URL(imageUrl)
        output.writeBytes(requestUrl.readBytes())
        return output.absolutePath
    }
}